package com.ruoyi.basics.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basics.mapper.PointMapper;
import com.ruoyi.basics.domain.Point;
import com.ruoyi.basics.service.IPointService;
import com.ruoyi.common.support.Convert;

/**
 * 计量点 服务层实现
 *
 * @author wangbing
 * @date 2018-12-28
 */
@Service
public class PointServiceImpl implements IPointService {
    @Autowired
    private PointMapper pointMapper;

    /**
     * 查询计量点信息
     *
     * @param id 计量点ID
     * @return 计量点信息
     */
    @Override
    public Point selectPointById(Integer id) {
        return pointMapper.selectPointById(id);
    }

    /**
     * 查询计量点列表
     *
     * @param point 计量点信息
     * @return 计量点集合
     */
    @Override
    public List<Point> selectPointList(Point point) {
        return pointMapper.selectPointList(point);
    }

    @Override
    public List<Point> selectPointByIds(List<String> ids) {
        return pointMapper.selectPointByIds(ids);
    }


    /**
     * 新增计量点
     *
     * @param point 计量点信息
     * @return 结果
     */
    @Override
    public int insertPoint(Point point) {
        return pointMapper.insertPoint(point);
    }

    /**
     * 修改计量点
     *
     * @param point 计量点信息
     * @return 结果
     */
    @Override
    public int updatePoint(Point point) {
        return pointMapper.updatePoint(point);
    }

    /**
     * 删除计量点对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePointByIds(String ids) {
        return pointMapper.deletePointByIds(Convert.toStrArray(ids));
    }

}
